package test11To20;

import java.util.Scanner;

public class Test15 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        String s = Integer.toString(num, 2);
        char[] chars = s.toCharArray();
        int total=0;
        for (int i = 0; i < chars.length; i++) {
            if (chars[i]=='1'){
                total++;
            }
        }

        System.out.println(total);
    }
}
